package com.szh.cloud.spring.util;

import org.jasypt.util.text.BasicTextEncryptor;

public class JasyptUtil {
    private  static  final  String textKey="0123456789ABCDEF";
    private static  String decrypt(String password){
        BasicTextEncryptor textEncryptor = new BasicTextEncryptor();
        textEncryptor.setPassword(textKey);
        return textEncryptor.decrypt(password);
    }

    public static  String encrypy(String password){
        BasicTextEncryptor textEncryptor = new BasicTextEncryptor();
        textEncryptor.setPassword(textKey);
        return textEncryptor.encrypt(password);
    }

    public static  void main(String[] args){
        System.out.println(encrypy("Huawei_123"));
        System.out.println(decrypt("Zc5XEAjiZw31/yIZ2C8X4xtG1K8Y9Am2"));
    }
}
